/**
 * TT.java created by zhangzhidong 
 * at 上午11:34:41 2017年8月25日
 */
package jdk;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.AbstractQueuedSynchronizer;
import java.util.concurrent.locks.ReadWriteLock;

public class GenericTest {
	public static void method1(List<String> l){
		
	}
	public static void main(String[] args) throws InterruptedException {
		CyclicBarrier cb = new CyclicBarrier(3);
		CountDownLatch cdl = new CountDownLatch(5);
		ExecutorService es = Executors.newFixedThreadPool(5);
		Future<String> f  = es.submit(()->{
			TimeUnit.SECONDS.sleep(10);
			return "ok";
		});
		ConcurrentHashMap<String, Object> fd = null;
		fd.put("", new Object());
		Object res = fd.putIfAbsent("", new Object());
		ReadWriteLock rwl;
		AbstractQueuedSynchronizer aqs;
		
//		Object o = new Object();
//		Thread t = new Thread(()->{
//			try {
//				synchronized (o) {
//					o.wait();
//				}
//				//TimeUnit.SECONDS.sleep(10000);
//			} catch (Exception e) {
//				
//				e.printStackTrace();
//			}
//		});
//		t.start();
//		TimeUnit.SECONDS.sleep(2);
//		t.interrupt();
		
//		String []str = new String[]{"abc","def"};
//		Object o [] = str;
//		o[0] = new Integer(1);
//		
//		List<String>[] string = new List[5];
//		Object o2  = string;
//		CopyOnWriteArrayList<String> f = new CopyOnWriteArrayList<>();
	}
}
